﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RaisingStudio.Data.SharePoint.Entities
{
    partial class Announcements : RaisingStudio.Data.Common.IDataObjectProxy
    {
        #region IDataObjectProxy Members

        public Type GetPropertyType(string name)
        {
            switch (name)
            {                
                case "ID":
                   {
                       return typeof(long?);
                   }
                case "ContentTypeId":
                   {
                       return typeof(string);
                   }
                case "ContentType":
                   {
                       return typeof(string);
                   }
                case "Title":
                   {
                       return typeof(string);
                   }
                case "Modified":
                   {
                       return typeof(DateTime?);
                   }
                case "Created":
                   {
                       return typeof(DateTime?);
                   }
                case "Author":
                   {
                       return typeof(string);
                   }
                case "Editor":
                   {
                       return typeof(string);
                   }
                case "_HasCopyDestinations":
                   {
                       return typeof(bool?);
                   }
                case "_CopySource":
                   {
                       return typeof(string);
                   }
                case "owshiddenversion":
                   {
                       return typeof(int?);
                   }
                case "WorkflowVersion":
                   {
                       return typeof(int?);
                   }
                case "_UIVersion":
                   {
                       return typeof(int?);
                   }
                case "_UIVersionString":
                   {
                       return typeof(string);
                   }
                case "Attachments":
                   {
                       return typeof(string);
                   }
                case "_ModerationStatus":
                   {
                       return typeof(string);
                   }
                case "_ModerationComments":
                   {
                       return typeof(string);
                   }
                case "Edit":
                   {
                       return typeof(string);
                   }
                case "LinkTitleNoMenu":
                   {
                       return typeof(string);
                   }
                case "LinkTitle":
                   {
                       return typeof(string);
                   }
                case "SelectTitle":
                   {
                       return typeof(string);
                   }
                case "InstanceID":
                   {
                       return typeof(int?);
                   }
                case "Order":
                   {
                       return typeof(decimal?);
                   }
                case "GUID":
                   {
                       return typeof(Guid?);
                   }
                case "WorkflowInstanceID":
                   {
                       return typeof(Guid?);
                   }
                case "FileRef":
                   {
                       return typeof(string);
                   }
                case "FileDirRef":
                   {
                       return typeof(string);
                   }
                case "Last_x0020_Modified":
                   {
                       return typeof(string);
                   }
                case "Created_x0020_Date":
                   {
                       return typeof(string);
                   }
                case "FSObjType":
                   {
                       return typeof(string);
                   }
                case "PermMask":
                   {
                       return typeof(string);
                   }
                case "FileLeafRef":
                   {
                       return typeof(string);
                   }
                case "UniqueId":
                   {
                       return typeof(string);
                   }
                case "ProgId":
                   {
                       return typeof(string);
                   }
                case "ScopeId":
                   {
                       return typeof(string);
                   }
                case "File_x0020_Type":
                   {
                       return typeof(string);
                   }
                case "HTML_x0020_File_x0020_Type":
                   {
                       return typeof(string);
                   }
                case "_EditMenuTableStart":
                   {
                       return typeof(string);
                   }
                case "_EditMenuTableEnd":
                   {
                       return typeof(string);
                   }
                case "LinkFilenameNoMenu":
                   {
                       return typeof(string);
                   }
                case "LinkFilename":
                   {
                       return typeof(string);
                   }
                case "DocIcon":
                   {
                       return typeof(string);
                   }
                case "ServerUrl":
                   {
                       return typeof(string);
                   }
                case "EncodedAbsUrl":
                   {
                       return typeof(string);
                   }
                case "BaseName":
                   {
                       return typeof(string);
                   }
                case "MetaInfo":
                   {
                       return typeof(string);
                   }
                case "_Level":
                   {
                       return typeof(int?);
                   }
                case "_IsCurrentVersion":
                   {
                       return typeof(bool?);
                   }
                case "Body":
                   {
                       return typeof(string);
                   }
                case "Expires":
                   {
                       return typeof(DateTime?);
                   }
                default:
                    {
                        throw new System.ArgumentOutOfRangeException(name);
                    }
            }
        }

        #endregion

        #region IObjectAccessor Members

        public object GetValue(object instance, string name)
        {
            Announcements _instance = instance as Announcements;
            switch (name)
            {                
                case "ID":
                   {
                       return _instance.ID;
                   }
                case "ContentTypeId":
                   {
                       return _instance.ContentTypeId;
                   }
                case "ContentType":
                   {
                       return _instance.ContentType;
                   }
                case "Title":
                   {
                       return _instance.Title;
                   }
                case "Modified":
                   {
                       return _instance.Modified;
                   }
                case "Created":
                   {
                       return _instance.Created;
                   }
                case "Author":
                   {
                       return _instance.Author;
                   }
                case "Editor":
                   {
                       return _instance.Editor;
                   }
                case "_HasCopyDestinations":
                   {
                       return _instance._HasCopyDestinations;
                   }
                case "_CopySource":
                   {
                       return _instance._CopySource;
                   }
                case "owshiddenversion":
                   {
                       return _instance.owshiddenversion;
                   }
                case "WorkflowVersion":
                   {
                       return _instance.WorkflowVersion;
                   }
                case "_UIVersion":
                   {
                       return _instance._UIVersion;
                   }
                case "_UIVersionString":
                   {
                       return _instance._UIVersionString;
                   }
                case "Attachments":
                   {
                       return _instance.Attachments;
                   }
                case "_ModerationStatus":
                   {
                       return _instance._ModerationStatus;
                   }
                case "_ModerationComments":
                   {
                       return _instance._ModerationComments;
                   }
                case "Edit":
                   {
                       return _instance.Edit;
                   }
                case "LinkTitleNoMenu":
                   {
                       return _instance.LinkTitleNoMenu;
                   }
                case "LinkTitle":
                   {
                       return _instance.LinkTitle;
                   }
                case "SelectTitle":
                   {
                       return _instance.SelectTitle;
                   }
                case "InstanceID":
                   {
                       return _instance.InstanceID;
                   }
                case "Order":
                   {
                       return _instance.Order;
                   }
                case "GUID":
                   {
                       return _instance.GUID;
                   }
                case "WorkflowInstanceID":
                   {
                       return _instance.WorkflowInstanceID;
                   }
                case "FileRef":
                   {
                       return _instance.FileRef;
                   }
                case "FileDirRef":
                   {
                       return _instance.FileDirRef;
                   }
                case "Last_x0020_Modified":
                   {
                       return _instance.Last_x0020_Modified;
                   }
                case "Created_x0020_Date":
                   {
                       return _instance.Created_x0020_Date;
                   }
                case "FSObjType":
                   {
                       return _instance.FSObjType;
                   }
                case "PermMask":
                   {
                       return _instance.PermMask;
                   }
                case "FileLeafRef":
                   {
                       return _instance.FileLeafRef;
                   }
                case "UniqueId":
                   {
                       return _instance.UniqueId;
                   }
                case "ProgId":
                   {
                       return _instance.ProgId;
                   }
                case "ScopeId":
                   {
                       return _instance.ScopeId;
                   }
                case "File_x0020_Type":
                   {
                       return _instance.File_x0020_Type;
                   }
                case "HTML_x0020_File_x0020_Type":
                   {
                       return _instance.HTML_x0020_File_x0020_Type;
                   }
                case "_EditMenuTableStart":
                   {
                       return _instance._EditMenuTableStart;
                   }
                case "_EditMenuTableEnd":
                   {
                       return _instance._EditMenuTableEnd;
                   }
                case "LinkFilenameNoMenu":
                   {
                       return _instance.LinkFilenameNoMenu;
                   }
                case "LinkFilename":
                   {
                       return _instance.LinkFilename;
                   }
                case "DocIcon":
                   {
                       return _instance.DocIcon;
                   }
                case "ServerUrl":
                   {
                       return _instance.ServerUrl;
                   }
                case "EncodedAbsUrl":
                   {
                       return _instance.EncodedAbsUrl;
                   }
                case "BaseName":
                   {
                       return _instance.BaseName;
                   }
                case "MetaInfo":
                   {
                       return _instance.MetaInfo;
                   }
                case "_Level":
                   {
                       return _instance._Level;
                   }
                case "_IsCurrentVersion":
                   {
                       return _instance._IsCurrentVersion;
                   }
                case "Body":
                   {
                       return _instance.Body;
                   }
                case "Expires":
                   {
                       return _instance.Expires;
                   }
                default:
                    {
                        throw new System.ArgumentOutOfRangeException(name);
                    }
            }
        }

        public void SetValue(object instance, string name, object value)
        {
            Announcements _instance = instance as Announcements;
            switch (name)
            {                
                case "ID":
                    {
                        _instance.ID = (long?)value;
                        return;
                    }
                case "ContentTypeId":
                    {
                        _instance.ContentTypeId = (string)value;
                        return;
                    }
                case "ContentType":
                    {
                        _instance.ContentType = (string)value;
                        return;
                    }
                case "Title":
                    {
                        _instance.Title = (string)value;
                        return;
                    }
                case "Modified":
                    {
                        _instance.Modified = (DateTime?)value;
                        return;
                    }
                case "Created":
                    {
                        _instance.Created = (DateTime?)value;
                        return;
                    }
                case "Author":
                    {
                        _instance.Author = (string)value;
                        return;
                    }
                case "Editor":
                    {
                        _instance.Editor = (string)value;
                        return;
                    }
                case "_HasCopyDestinations":
                    {
                        _instance._HasCopyDestinations = (bool?)value;
                        return;
                    }
                case "_CopySource":
                    {
                        _instance._CopySource = (string)value;
                        return;
                    }
                case "owshiddenversion":
                    {
                        _instance.owshiddenversion = (int?)value;
                        return;
                    }
                case "WorkflowVersion":
                    {
                        _instance.WorkflowVersion = (int?)value;
                        return;
                    }
                case "_UIVersion":
                    {
                        _instance._UIVersion = (int?)value;
                        return;
                    }
                case "_UIVersionString":
                    {
                        _instance._UIVersionString = (string)value;
                        return;
                    }
                case "Attachments":
                    {
                        _instance.Attachments = (string)value;
                        return;
                    }
                case "_ModerationStatus":
                    {
                        _instance._ModerationStatus = (string)value;
                        return;
                    }
                case "_ModerationComments":
                    {
                        _instance._ModerationComments = (string)value;
                        return;
                    }
                case "Edit":
                    {
                        _instance.Edit = (string)value;
                        return;
                    }
                case "LinkTitleNoMenu":
                    {
                        _instance.LinkTitleNoMenu = (string)value;
                        return;
                    }
                case "LinkTitle":
                    {
                        _instance.LinkTitle = (string)value;
                        return;
                    }
                case "SelectTitle":
                    {
                        _instance.SelectTitle = (string)value;
                        return;
                    }
                case "InstanceID":
                    {
                        _instance.InstanceID = (int?)value;
                        return;
                    }
                case "Order":
                    {
                        _instance.Order = (decimal?)value;
                        return;
                    }
                case "GUID":
                    {
                        _instance.GUID = (Guid?)value;
                        return;
                    }
                case "WorkflowInstanceID":
                    {
                        _instance.WorkflowInstanceID = (Guid?)value;
                        return;
                    }
                case "FileRef":
                    {
                        _instance.FileRef = (string)value;
                        return;
                    }
                case "FileDirRef":
                    {
                        _instance.FileDirRef = (string)value;
                        return;
                    }
                case "Last_x0020_Modified":
                    {
                        _instance.Last_x0020_Modified = (string)value;
                        return;
                    }
                case "Created_x0020_Date":
                    {
                        _instance.Created_x0020_Date = (string)value;
                        return;
                    }
                case "FSObjType":
                    {
                        _instance.FSObjType = (string)value;
                        return;
                    }
                case "PermMask":
                    {
                        _instance.PermMask = (string)value;
                        return;
                    }
                case "FileLeafRef":
                    {
                        _instance.FileLeafRef = (string)value;
                        return;
                    }
                case "UniqueId":
                    {
                        _instance.UniqueId = (string)value;
                        return;
                    }
                case "ProgId":
                    {
                        _instance.ProgId = (string)value;
                        return;
                    }
                case "ScopeId":
                    {
                        _instance.ScopeId = (string)value;
                        return;
                    }
                case "File_x0020_Type":
                    {
                        _instance.File_x0020_Type = (string)value;
                        return;
                    }
                case "HTML_x0020_File_x0020_Type":
                    {
                        _instance.HTML_x0020_File_x0020_Type = (string)value;
                        return;
                    }
                case "_EditMenuTableStart":
                    {
                        _instance._EditMenuTableStart = (string)value;
                        return;
                    }
                case "_EditMenuTableEnd":
                    {
                        _instance._EditMenuTableEnd = (string)value;
                        return;
                    }
                case "LinkFilenameNoMenu":
                    {
                        _instance.LinkFilenameNoMenu = (string)value;
                        return;
                    }
                case "LinkFilename":
                    {
                        _instance.LinkFilename = (string)value;
                        return;
                    }
                case "DocIcon":
                    {
                        _instance.DocIcon = (string)value;
                        return;
                    }
                case "ServerUrl":
                    {
                        _instance.ServerUrl = (string)value;
                        return;
                    }
                case "EncodedAbsUrl":
                    {
                        _instance.EncodedAbsUrl = (string)value;
                        return;
                    }
                case "BaseName":
                    {
                        _instance.BaseName = (string)value;
                        return;
                    }
                case "MetaInfo":
                    {
                        _instance.MetaInfo = (string)value;
                        return;
                    }
                case "_Level":
                    {
                        _instance._Level = (int?)value;
                        return;
                    }
                case "_IsCurrentVersion":
                    {
                        _instance._IsCurrentVersion = (bool?)value;
                        return;
                    }
                case "Body":
                    {
                        _instance.Body = (string)value;
                        return;
                    }
                case "Expires":
                    {
                        _instance.Expires = (DateTime?)value;
                        return;
                    }
                default:
                    {
                        throw new System.ArgumentOutOfRangeException(name);
                    }
            }
        }

        #endregion

        #region IObjectCreater Members

        public object CreateObject()
        {
            return new Announcements();
        }

        public System.Collections.IList CreateObjectList()
        {
            return new System.Collections.Generic.List<Announcements>();
        }

        #endregion
    }
}
